<div class='form'>
  <% form_for [@product,@pcolor],:html=>{:multipart=>true} do |f| %>
    <%= f.error_messages %>

    <p>
      <label for="pcolor_name">颜色名称</label>
      <%=  f.text_field  :name,:size=>20 %>
    </p>

    <p>
      <label for="pcolor_image─url">图片1</label>
      <%= file_column_field "pcolor", "image_url" %>
    </p>

    <p>
      <label for="pcolor_image─url1">图片2</label>
      <%= file_column_field "pcolor", "image_url1" %>
    </p>

    <p>
      <label for="pcolor_image─url2">图片3</label>
      <%= file_column_field "pcolor", "image_url2" %>
    </p>

    <p>
      <label for="pcolor_image─url3">图片4</label>
      <%= file_column_field "pcolor", "image_url3" %>
    </p>

    <p>
      <label for="pcolor_quantity">库存数量</label>
      <%=  f.text_field  :quantity,:size=>5 %>
    </p>

    <p>
      <label for="pcolor_active">可用</label>
      <%= f.check_box :active %>
    </p>

    <p>
      <%= f.submit button_name,:class=>'submit' %>
    </p>
  <% end %>
</div>